#ifndef _HOSTSTRUCT_HH_
#define _HOSTSTRUCT_HH_

#include <sys/types.h>
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>

namespace requestDevices
{

  struct Host
  {
    std::string name;
    std::string address;
    uint16_t port;
    void getNumAddr(in_addr* addr) {inet_aton(address.c_str(), addr);}
    const char * getStrPort() {return boost::lexical_cast<std::string>(port).c_str();}
    Host() {};
    Host(std::string n, std::string a, uint16_t p) : name(n), address(a), port(p) {}
    void copy(Host & h) {name = h.name; address = h.address; port = h.port;}
    
  };
  
  typedef boost::shared_ptr<Host> Host_p;

  const uint32_t BUFSIZE = 8192;

}
#endif // _HOSTSTRUCT_HH_
